//package com.yunlong.softpark.core.exception;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Component;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import java.net.SocketException;
//
///**
// * @Author: Cui
// * @Date: 2020/8/20
// * @Description:
// */
//@Component
//@ControllerAdvice
//public class GlobalExceptionHandler {
////    private static Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
//
//    /**
//     * @Description: 捕获没有被其他地方捕获的异常
//     * @param: RuntimeException
//     * @Author:        LXJ
//     * @CreateDate:     2018/12/7 15:18
//     * @Version:        1.0
//     */
//    @ExceptionHandler
//    @ResponseBody
//    public void exceptionHandle(RuntimeException e){
//        System.out.println("数据库连接异常！");
////        return ApiResult.result(ApiStatus.GL99990500,"系统出错！").toString();
//    }
//    @ExceptionHandler
//    @ResponseBody
//    public void socketExceptionHandle(SocketException e){
//        System.out.println("数据库连接异常！");
////        return ApiResult.result(ApiStatus.GL99990500,"系统出错！").toString();
//    }
//    /**
//     * @Description: 导入异常处理
//     * @param: MyException
//     * @Author:        LXJ
//     * @CreateDate:     2018/12/7 15:18
//     * @Version:        1.0
//     */
////    @ExceptionHandler(value = S.class)
////    @ResponseBody
////    public String mYExceptionHandler(MyException e){
////        System.out.println(e.getMessage()+"**********");
////        return ApiResult.result(ApiStatus.GL99990100,e.getMessage()).toString();
////    }
//}
